package fitness;

import java.text.DecimalFormat;
import optimizers.ganeat.xor.ConstantsXOR;

import util.MyUtil;

public class ChaoticResult extends FitnessResult {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public double[] entropy;

	@Override
	public double finalResult() {
		double result = 0;
		for (double e : entropy) {
			result += e;
		}
		return result;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append(common.Static.df4.format(finalResult()) + " = ");
		for (double e : entropy) {
			builder.append(common.Static.df4.format(e) + " + ");
		}
		return builder.toString();
	}

	@Override
	public Double[] getDecomposition() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean goodSolution() {
		return finalResult() > 1000;
	}

}
